Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@turf/rhumb-distance

Package Overview
Dependencies
Maintainers
9
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/rhumb-distance

turf rhumb-distance module

  • 7.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
9
Created

What is @turf/rhumb-distance?

@turf/rhumb-distance is a module from the Turf.js library that calculates the rhumb line distance between two geographical points. A rhumb line is a path of constant bearing, which is different from the shortest path (great-circle distance) on a sphere. This package is useful for applications that require consistent bearing, such as navigation and mapping.

What are @turf/rhumb-distance's main functionalities?

Calculate Rhumb Distance

This feature calculates the rhumb line distance between two geographical points. The `units` option allows you to specify the unit of measurement, such as miles, kilometers, etc.

const turf = require('@turf/turf');

const point1 = turf.point([-75.343, 39.984]);
const point2 = turf.point([-75.534, 39.123]);
const options = { units: 'miles' };
const distance = turf.rhumbDistance(point1, point2, options);
console.log(distance);

Other packages similar to @turf/rhumb-distance

Keywords

FAQs

Package last updated on 09 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc